//
// Created by postgres on 5/8/17.
//

#ifndef MYDATASTRUCTURES_GRAPH_H
#define MYDATASTRUCTURES_GRAPH_H
#include "../common/common.h"
typedef char VertexType;
typedef int EdgeType;
#define MAXVEX 100
#define INFINITY 65535
/*----------------邻接矩阵-----------------*/
typedef struct MGraph
{
    VertexType vexs[MAXVEX];
    EdgeType arc[MAXVEX][MAXVEX];
    int numVertexes,numEdges;

}MGraph;
void mGraph_test();
/*--------邻接表------------------------- */

typedef struct EdgeNode
{
    int adjvex;
    EdgeType weight;
    struct EdgeNode *next;

}EdgeNode;
typedef struct VertexNode
{
    VertexType data;
    EdgeNode *firstedge;
}VertexNode,AdjList[MAXVEX];
typedef struct GraphAdjList
{
    AdjList adjlist;
    int numVertexes,numEdges;
}GraphAdjList;
void AdjListGraph_test();
#endif //MYDATASTRUCTURES_GRAPH_H
